<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title> ModularAdmin - Free Dashboard Theme | HTML Version </title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="apple-touch-icon" href="apple-touch-icon.png">
    <!-- Place favicon.ico in the root directory -->
    <link rel="stylesheet" href="../css/vendor.css">
    <!-- Theme initialization -->
    <script>
        var themeSettings = (localStorage.getItem('themeSettings')) ? JSON.parse(localStorage.getItem('themeSettings')) :
            {};
        var themeName = themeSettings.themeName || '';
        if (themeName)
        {
            document.write('<link rel="stylesheet" id="theme-style" href="../css/app-' + themeName + '.css">');
        }
        else
        {
            document.write('<link rel="stylesheet" id="theme-style" href="../css/app.css">');
        }
    </script>
    <script src="../js/jquery-3.3.1.js"></script>
</head>
<body>
<div class="col-md-6">
    <div class="card card-block sameheight-item">
        <div class="title-block">
            <h3 th:if="${type} eq '1'" class="title"> 发送积分 </h3>
        </div>
        <form role="form" id="form1">
            <input name="id" type="text" hidden="hidden" th:value="${userBase.id}" class="form-control underlined"> </div>
    <div class="form-group">
        <label class="control-label">用户名</label>
        <input name="userName" readonly="readonly" type="text"  th:value="${userBase.realName}" class="form-control underlined"> </div>
    <div class="form-group">
        <label class="control-label">手机号</label>
        <input name="phone" readonly="readonly" type="text"  th:value="${userBase.phone}"  class="form-control underlined"> </div>
    <div class="form-group">
        <label class="control-label">积分</label>
        <input name="point" type="text"  onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();" class="form-control underlined"> </div>
    <div class="form-group" >
        <label class="control-label">是否冻结</label>
        <select name="type" id="type" >
            <option value="0">不冻结</option>
            <option value="1">冻结</option>
        </select> </div>
    <div class="form-group" >
        <label class="control-label">冻结时间</label>
        <input name="froceTime" id="froceTime" type="text"  class="form-control underlined"> </div>
    <button type="button" class="btn btn-primary-outline" onclick="addPoint()">发送</button>
    </form>
</div>
</div>
<script src="../js/laydate/laydate.js"></script>

<script type="text/javascript">
    function addPoint(){

        jQuery.ajax({
            dataType:'json',
            type:'post',
            async:false,
            url:"../bumng/addPoint.do",
            data:$('#form1').serialize(),
            success:function(data){

                if(data.bizSucc){
                    window.opener.location.href = window.opener.location.href;
                    window.close();
                }else{
                    alert(data.msg);
                }


            },

            error : function(data) {
                alert(data);
            }
        });
    }
    //时间选择器
    laydate.render({
        elem: '#froceTime'
        ,type: 'datetime'
    });

</script>

</body>
</html>